/**
 * 
 */
package com.demo2do.wechatmcs.entity.token;

import org.apache.commons.lang3.StringUtils;

/**
 * @author downpour
 */
public class JsTicket {

    private String appid;
    
    private String ticket;
    
    /**
     * The default constructor
     */
    public JsTicket() {
        
    }
    
    /**
     * The constructor using fields 
     * 
     * @param appid
     * @param ticket
     */
    public JsTicket(String appid, String ticket) {
        this.appid = appid;
        this.ticket = ticket;
    }

    /**
     * 
     * @return
     */
    public boolean isValid() {
        return StringUtils.isNotBlank(this.ticket);
    }
    
    /**
     * @return the appid
     */
    public String getAppid() {
        return this.appid;
    }

    /**
     * @return the ticket
     */
    public String getTicket() {
        return this.ticket;
    }

    /**
     * @param appid the appid to set
     */
    public void setAppid(String appid) {
        this.appid = appid;
    }

    /**
     * @param ticket the ticket to set
     */
    public void setTicket(String ticket) {
        this.ticket = ticket;
    }
    
}
